package com.trkj.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.trkj.dao.mybatis.M_hosp_patien;
import com.trkj.pojos.DepositTable;
import com.trkj.vo.Patient_registration_manageVo;
import com.trkj.vo.Serach_condition;

@Service
@Transactional
public class Hosp_emer_service {
	@Autowired
	M_hosp_patien m_hosp;
	
	/**
	 * 加载急诊挂号信息
	 * @param patient
	 * @return
	 */
	public Map<String,Object> load_jizhen(Serach_condition patient){
		Page<DepositTable> p = PageHelper.startPage(patient.getPage(),patient.getRows(), true);
		List<Patient_registration_manageVo> list=m_hosp.load_jizhen(patient);
		Map<String,Object> map=new HashMap<String, Object>();
		map.put("rows", list);
		map.put("total", p.getTotal());
		map.put("page", 1);
		return map;
	}
}
